﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=7">
            <title>管理员登录</title>
            <meta name="keywords" content="" />
            <link href="__PUBLIC__/admin/css/main.css" rel="stylesheet" type="text/css"/>
            <js href='__PUBLIC__/jquery-1.7.2.min.js'/>
            <script>
                $(function(){
                    $('#code').click(function(){
                        $(this).attr('src',"{:U('verify')}"+'/'+Math.random());
                    });
                    //异步方式验证登录账号
                    $('input[name="username"]').blur(function(){
                        $.post("{|U:'login'}",{'username':$(this).val()},function(data){
                            if(data==1){
                                $('#namemsg').html('<font color="red">用户名不存在</font>');
                                $('input[name="login2"]').attr('disabled',true);
                            }else{
                                $('#namemsg').html('<font color="green">用户名正确</font>');
                                $('input[name="login2"]').attr('disabled',false);
                            }
                        });
                    });
                    //异步验证　验证码
                    $('input[name="code"]').keyup(function(){
                        $.post("{|U:'login'}",{'code':$(this).val()},function(data){
                            if(data==1){
                                $('#comsg').html('<font color="red">验证码错误</font>');
                                $('input[name="login2"]').attr('disabled',true);
                            }else{
                                $('#comsg').html('<font color="green">验证码输入正确</font>');
                                $('input[name="login2"]').attr('disabled',false);
                            }
                        });
                    });

                })

            </script>
    </head>
    <body>
        <style type="text/css">
            <!--
            .wrap { width: 1000px;margin:0 auto;}
            .w30{width:30px;}
            #code{position: relative;top:8px;}
            #namemsg,#comsg{margin-left: 5px;}
            -->
        </style>

        <div class="content">
            <div style="padding:100px 0px 150px 0px; margin:0px auto;width:100%;">
                <table border="0" align="center" cellpadding="5" cellspacing="0">
                    <form name="login" id="login" method="post" action="{:U('login')}" method='post' >
                        <tr><td></td><td height="50"><h1 class="green"><strong>管理员登录</strong></h1></td></tr>
                        <tr><td align="right" height="36" width="100"> <h4>登录账号：</h4> </td>
                            <td width="300"><input name="username" type="text" class="input_com" size="30" /><span id="namemsg"></span></td></tr>
                        <tr><td align="right" height="36"><h4> 密 码：</h4> </td>
                            <td><input name="password" type="password" class="input_com" size="30" /></td></tr>
                        <tr>
                            <tr><td align="right" height="36"><h4>验 证 码：</h4> </td>
                                <td><input name="code" type="text" class="input_com" style='width:80px;'/>
                                    <img src='{:U('verify')}' id='code'/><span id="comsg"></span>
                                </td></tr>
                            <tr>
                                <td></td><td  height="50">
                                    <table border="0" cellpadding="0" cellspacing="3">
                                        <tr><td><input type="submit"  class="sc_submit" name="login2"  value="登 录"  /></td>
                                        </tr></table>
                                    <table border="0" cellpadding="0" cellspacing="3">
                                        <tr></tr>
                                        <tr>
                                            <td>友情提示：初始账号:admin,初始密码:admin888</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>

                    </form>

                </table>
            </div></div>


        <!--底部-->
        <div id="bot">
            <div id="bot_main" class="wrap">
                <!--        <span class="r" style="color:#CCC"><a href="http://www.tooopen.com/sevice_main.aspx?id=326"
                                    rel="nofollow">关于素材公社</a> | <a href="http://www.tooopen.com/sevice_main.aspx?id=358" rel="nofollow">联系我们</a> | <a href="http://www.tooopen.com/sc_new.aspx">最新素材</a>  | <a href="http://www.tooopen.com/sevice_main.aspx?id=322" rel="nofollow">法律声明</a> | <a href="http://www.tooopen.com/sevice_main.aspx"
                                        rel="nofollow">服务中心</a> | <a href="http://www.tooopen.com/webmap.aspx">网站地图</a> | <a href="http://www.tooopen.com/info.aspx">
                                            资讯中心</a>
                                </span>-->
                <span class="r" style="color:#CCC">有关ecms问题请咨询www.abcd.com</span>
            </div>
        </div>
    </body>
</html>
